package com.mogist.hqc.module.common.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.mogist.hqc.R
import com.mogist.hqc.entitys.response.CommentVo
import com.mogist.hqc.util.Util
import talex.zsw.basecore.util.DataTool
import talex.zsw.basecore.util.glide.GlideApp

/**
 * 作用：订单列表
 * 作者：赵小白 email:vvtale@gmail.com  
 * 修改人：
 * 修改时间：
 * 修改备注：
 */
class CommentAdapter : BaseQuickAdapter<CommentVo, BaseViewHolder>(R.layout.item_comment)
{
    override fun convert(helper: BaseViewHolder, item: CommentVo)
    { //iIvIcon iTvName iTvTime iTvInfo
        helper.setText(R.id.iTvName, DataTool.formatPhone(item.userName))
                .setText(R.id.iTvTime, Util.getTimeStr(item.createTime))
                .setText(R.id.iTvInfo, item.content)
        GlideApp.with(mContext)
                .load(item.headImg)
                .centerCrop()
                .into(helper.getView(R.id.iIvIcon))
    }

}